package com.icatw.club.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.icatw.club.domain.ClubCollege;
import com.icatw.club.mapper.ClubCollegeMapper;
import com.icatw.club.service.IClubCollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 二级学院Service业务层处理
 *
 * @author icatw
 * @date 2022-06-09
 */
@Service
public class ClubCollegeServiceImpl extends ServiceImpl<ClubCollegeMapper, ClubCollege> implements IClubCollegeService {
    @Autowired
    private ClubCollegeMapper clubCollegeMapper;

    /**
     * 查询二级学院
     *
     * @param cId 二级学院主键
     * @return 二级学院
     */
    @Override
    public ClubCollege selectClubCollegeByCId(Long cId) {
        return clubCollegeMapper.selectClubCollegeByCId(cId);
    }

    /**
     * 查询二级学院列表
     *
     * @param clubCollege 二级学院
     * @return 二级学院
     */
    @Override
    public List<ClubCollege> selectClubCollegeList(ClubCollege clubCollege) {
        return clubCollegeMapper.selectClubCollegeList(clubCollege);
    }

    /**
     * 新增二级学院
     *
     * @param clubCollege 二级学院
     * @return 结果
     */
    @Override
    public int insertClubCollege(ClubCollege clubCollege) {
        return clubCollegeMapper.insertClubCollege(clubCollege);
    }

    /**
     * 修改二级学院
     *
     * @param clubCollege 二级学院
     * @return 结果
     */
    @Override
    public int updateClubCollege(ClubCollege clubCollege) {
        return clubCollegeMapper.updateClubCollege(clubCollege);
    }

    /**
     * 批量删除二级学院
     *
     * @param cIds 需要删除的二级学院主键
     * @return 结果
     */
    @Override
    public int deleteClubCollegeByCIds(Long[] cIds) {
        return clubCollegeMapper.deleteClubCollegeByCIds(cIds);
    }

    /**
     * 删除二级学院信息
     *
     * @param cId 二级学院主键
     * @return 结果
     */
    @Override
    public int deleteClubCollegeByCId(Long cId) {
        return clubCollegeMapper.deleteClubCollegeByCId(cId);
    }
}
